<?php
require_once "includes/config.php";
require_once 'includes/class.phpmailer.php';

$prodId = $_REQUEST['prodId'];

$sqlSelProd		= "SELECT product_name FROM tbl_product WHERE product_id='$proId'";
$rstSelProd		= mysql_query($sqlSelProd);
$rowSelProd		= mysql_fetch_array($rstSelProd);
$productName		= $rowSelProd['product_name'];
$emailContent="Hello,<br />".$_SESSION['username']." is reporting product $productName.";
									

$mailmsg="<table width='100%' border='0' style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px; line-height:25px'>
<tr>
        <td height='32' colspan='2' style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;'>".$emailContent."</td>
</tr>
</table>";
$mail = new PHPMailer(); // defaults to using php "mail()"
$mail->MsgHTML($mailmsg);
$mail->From       = "mail@swapen.com";
$mail->FromName   = "Swapen.com";
$mail->Subject    = "Item Reported";
$mail->AddAddress('reportitem@swapen.com', 'Report');
$mail->Send();

echo '1';

?>